package com.jd.genie.handler;


import com.jd.genie.agent.enums.AgentType;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

@Component
public class AgentHandlerFactory {

    @Resource
    private PlanSolveHandlerImpl planSolveHandler;

    @Resource
    private ReactHandlerImpl reactHandler;

    public AgentHandlerService getHandler(int agentType)
    {
        if (agentType == AgentType.PLAN_SOLVE) {
            return planSolveHandler;
        } else if (agentType == AgentType.REACT) {
            return reactHandler;
        }
        throw new IllegalArgumentException();
    }

}